#include "stdafx.h"
#include "soundmanager.h"

#include <AL/alc.h>

class ALCDevice
{
public:
    static ALCDevice& instance()
    {
        static ALCDevice device;
        return device;
    }

    static void checkError()
    {
        //ALCenum ret = alcGetError(instance()._device);
        //! TODO: check ret
    }

private:
    ALCdevice *_device;

    ALCDevice()
    {
        _device = alcOpenDevice(NULL);
    }

    ~ALCDevice()
    {
        ALCboolean status = alcCloseDevice(_device);
        //! TODO: add status check
    }
};

namespace ALC {

} // namespace ALC
